//
//  PCDApiShowWaitPanel.m
//  PCDBank
//
//  Created by lyy on 2021/3/17.
//  Copyright © 2021 DK. All rights reserved.
//

#import "PCDApiShowWaitPanel.h"
#import "PCDBankWebViewController.h"

@implementation PCDApiShowWaitPanel

- (void)handler:(id)data andContext:(PCDContext *)context ResponseCallback:(WVJBResponseCallback)responseCallback {
    PCDLog(@"显示等待层%@",data);
    NSDictionary *dictRes;
    if ([data isKindOfClass:[NSDictionary class]]) {
        dictRes = (NSDictionary*)data;
    }else{
        dictRes =(NSDictionary*)[data JSONValue];
    }
    NSString *msg = [dictRes objectForKey:@"title"];
    BOOL mask = [[dictRes objectForKey:@"mask"] boolValue];
    
    PCDBankWebViewController *viewPage = context.viewController;
//	[PCDWaittingService showWaitWithTitle:msg isFullScreen:mask parent:viewPage.view];
    [viewPage.view showHBWait:YES isFullScreen:YES];
    //如果有成功回调 调用下
    NSString *success = [dictRes objectForKey:@"success"];
    if (![PCDUtil nilOrEmptyString:success]) {
        evaluateJavaScriptOnMainThread_quotes(self, [data objectForKey:@"success"],@"");
    }
}

@end
